export const searchForm = [
    {
        type: 'rangePicker',
        key: 'startClassTime',
        label: '开课时间',
        props: {

        }
    },
    {
        type: 'select',
        key: 'clazzStatus',
        label: '行课状态',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'departmentFnc',
        label: '学部',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'firstClassifyName',
        // 被依赖项；用于改变时，清空控制项
        controlItems: ['secondClassifyName'],
        label: '一级渠道',
        optionsConfig: {
            options: [],
            pager: {},
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'secondClassifyName',
        // 联动
        dependItemKey: 'firstClassifyName',
        label: '二级渠道',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    },
    {
        type: 'select',
        key: 'providerName',
        label: '渠道代理',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple',
            showSearch: true,
            filterOption: false,
        }
    },
    // {
    //     type: 'select',
    //     key: 'period',
    //     label: '期次',
    //     optionsConfig: {
    //         options: [],
    //         pager: {}
    //     },
    //     props: {
    //         mode: 'multiple'
    //     }
    // },
    {
        type: 'select',
        key: 'periodName',
        label: '期名',
        optionsConfig: {
            options: [],
            pager: {}
        },
        props: {
            mode: 'multiple'
        }
    }
];

// 页面id
export const pageId = {
    0: {
        id: 'transformationThisMonth',
        title: '本月行课流量转化',
        selectID: 'selectUnit_1'
    },
};

// 纬度id由页面id 和 纬度key拼接成, 小驼峰
export const getDimensionId = (index, searchKey) => {
    if (searchKey) {
        const newSearchKey = searchKey.slice(0, 1).toUpperCase() + searchKey.slice(1);

        return pageId[index].id + newSearchKey;
    }

    return '';
};

// 每个页面里细分了模块，一个模块是一个看板
export const dashBoardList = [
    {
        dashboardName: 'transformationThisMonthTitle',
        dashboardId: 'transformationThisMonthTitle'
    },
    {
        dashboardName: 'transformationThisMonthGeneralView',
        dashboardId: 'transformationThisMonthGeneralView'
    },
    {
        dashboardName: 'transformationThisMonthConversionEfficiency',
        dashboardId: 'transformationThisMonthConversionEfficiency'
    },
    {
        dashboardName: 'transformationThisMonthFlowQuality',
        dashboardId: 'transformationThisMonthFlowQuality'
    }
];

